{include file="public/header"/}
{load href="/public/static/Content/ThemesBusiness/FormPage.css"}

<form id="formState" style="width:95%; text-align:center;">
    <table class="form_table" width="860px" style=" margin:0 auto;">
       
        <tr class="form_tr">
            <th style="padding-left:8px;width:80px;" class="form_td form_th_title">
                商品名称
            </th>
            <td style="width:90%;padding-left:8px;" colspan="4" class="form_td form_td_content">
                <input class="easyui-validatebox" type="text" style="width:600px;"
                       value="{$good.name}"  disabled="disabled" data-options="required:true,tipPosition:'right'," />
            </td> 
        </tr>

         <tr class="form_tr">
            <th style="padding-left:8px;width:80px;" class="form_td form_th_title">
                商品序列号
            </th>
            <td style="width:90%;padding-left:8px;" colspan="4" class="form_td form_td_content">
                <input class="easyui-validatebox" type="text" style="width:600px;"
                       value="{$fix.tagslogs_sn}"   disabled="disabled" data-options="required:true,tipPosition:'right'," />
            </td> 
        </tr>

         <tr class="form_tr">
            <th style="padding-left:8px;width:80px;" class="form_td form_th_title">
                维修项目
            </th>
            <td style="width:90%;padding-left:8px;" colspan="4" class="form_td form_td_content">
                <input class="easyui-validatebox" type="text" style="width:600px;"
                       value="{$info.project}" name="project"   data-options="required:true,tipPosition:'right'," />
            </td> 
        </tr>

          <tr class="form_tr">
            <th style="padding-left:8px;width:80px;" class="form_td form_th_title">
                维修时间
            </th>
            <td style="width:90%;padding-left:8px;" colspan="4" class="form_td form_td_content">
                <input  type="text" style="width:600px;"
                       value="{$info.date}" class="easyui-datebox"   name="date" data-options="required:true,tipPosition:'right'," />
            </td> 
        </tr>
       
          <tr class="form_tr">
            <th style="padding-left:8px;width:80px;" class="form_td form_th_title">
                维修人员
            </th>
            <td style="width:90%;padding-left:8px;" colspan="4" class="form_td form_td_content">
                <input class="easyui-validatebox" type="text" style="width:600px;"
                       value="{$info.personnel}" name="personnel"  data-options="required:true,tipPosition:'right'," />
            </td> 
        </tr>

          <tr class="form_tr">
            <th style="padding-left:8px;width:80px;" class="form_td form_th_title">
                维修费用
            </th>
            <td style="width:90%;padding-left:8px;" colspan="4" class="form_td form_td_content">
                <input class="easyui-validatebox" type="text" style="width:600px;"
                       value="{$info.price}"   name="price"  data-options="required:true,tipPosition:'right'," />
            </td> 
        </tr>

         <tr class="form_tr">
         <th style="padding-left:8px;width:80px;" class="form_td form_th_title">
                维修说明
            </th> 
            <td colspan="4" style="width:87.5%;padding-left:8px; height:150px;border: none" class="form_td form_td_content">
                <textarea class="easyui-validatebox" id="container" name="mark" data-options="tipPosition:'right'" >{$info.mark}</textarea>
            </td>
        </tr> 

         <tr class="form_tr" style="margin-top:20px ">
            <th style="width:80px;" colspan="5" class="form_td form_th_title">
                客户提交的信息
            </th>
           
        </tr>

           <tr class="form_tr" >
            <th style="padding-left:8px;width:80px;" class="form_td form_th_title">
                送检单位
            </th>
            <td style="width:90%;padding-left:8px;" colspan="4" class="form_td form_td_content">
                <input class="easyui-validatebox" type="text" style="width:600px;"
                       value="{$info.danwei}"   name="danwei"  data-options="required:true,tipPosition:'right'," />
            </td> 
        </tr>

           <tr class="form_tr">
            <th style="padding-left:8px;width:80px;" class="form_td form_th_title">
                联系人
            </th>
            <td style="width:90%;padding-left:8px;" colspan="4" class="form_td form_td_content">
                <input class="easyui-validatebox" type="text" style="width:600px;"
                       value="{$info.contacts}"   name="contacts"  data-options="required:true,tipPosition:'right'," />
            </td> 
        </tr>

        <tr class="form_tr">
            <th style="padding-left:8px;width:80px;" class="form_td form_th_title">
                联系电话
            </th>
            <td style="width:90%;padding-left:8px;" colspan="4" class="form_td form_td_content">
                <input class="easyui-validatebox" type="text" style="width:600px;"
                       value="{$info.telphone}"   name="telphone"  data-options="required:true,tipPosition:'right'," />
            </td> 
        </tr>

        <tr class="form_tr">
            <th style="padding-left:8px;width:80px;" class="form_td form_th_title">
                通知邮箱
            </th>
            <td style="width:90%;padding-left:8px;" colspan="4" class="form_td form_td_content">
                <input class="easyui-validatebox" type="text" style="width:600px;"
                       value="{$info.email}"   name="email"  data-options="required:true,tipPosition:'right'," />
            </td> 
        </tr>

        <tr class="form_tr">
            <th style="padding-left:8px;width:80px;" class="form_td form_th_title">
                故障原因
            </th>
            <td style="width:90%;padding-left:8px;" colspan="4" class="form_td form_td_content">
                <input class="easyui-validatebox" type="text" style="width:600px;"
                       value="{$info.cause}"   name="cause"  data-options="required:true,tipPosition:'right'," />
            </td> 
        </tr>
        

        <tr class="form_tr">
            <th style="padding-left:8px;width:80px;" class="form_td form_th_title">
                图片
            </th>
            <td style="width:90%;padding-left:8px;" colspan="4" class="form_td form_td_content">
                <a href="#" onclick="show_bxk({$info.id})" title="查看图片" style="color:#1024EE;">查看图片</a>
            </td> 
        </tr>

        <tr class="form_tr">
            <th style="padding-left:8px;width:80px;" class="form_td form_th_title">
                视频
            </th>
            <td style="width:90%;padding-left:8px;" colspan="4" class="form_td form_td_content">
                <a target="_blank" href="/uploads/video/{$info.video}">点击查看</a>
            </td> 
        </tr>
       
       


<!-- 
     <tr class="form_tr">
            <th style="padding-left:8px;width:80px;" class="form_td form_th_title">
                背景图片
            </th>
            <td style="width:600px;padding-left:8px;" colspan="5" class="form_td form_td_content">
                <input class="easyui-validatebox" type="file"  style="width:600px;"
                      id="bg_img2"  data-options="tipPosition:'right'," />
            </td>
        </tr>

          <tr class="form_tr">
           
            <td style="width:600px;padding-left:8px;" colspan="6" class="form_td form_td_content">
                <img id="img2_view" src="/uploads/card/bg_img2/" style="width: 60px;height: 40px;">
            </td>
        </tr>
 -->



      
        <input type="hidden" name="id" value="{$info.id}">
        <input type="hidden" name="sn" value="{$fix.tagslogs_sn}">
      
       
        <tr class="form_tr">
            <td class="form_button_panel" colspan="5" style="padding-right:8px">
                
                <a  id="save"  class="easyui-linkbutton form-toolbar-button" data-options="iconCls:'icon-save'">保存</a>
                <a  id="saveAndSend"  class="easyui-linkbutton form-toolbar-button" data-options="iconCls:'icon-save'">保存并通知客户</a>
              
            </td>
        </tr>
    </table>
    <!-- 判断是否需要发送消息给客户 -->
    <input type="hidden" name="send" value="0">
</form>
<script>
    var width = $(window).width() * 0.6;
    var height = $(window).height() * 1.05;

    //查看保修卡
    function show_bxk(id) {
        window.showBusinessForm("查看图片", '/admin/fix/seeimgs.html?id=' + id, width, height);
    }
    function showvideo(val, row, index) {
        if (row.video == '') {
            val = '无';
        } else {
            val = '<a target="_blank" href="/uploads/video/' + row.video + '">点击查看' + '</a>';
        }
        return val;
    }
</script>

<script type="text/javascript" src="/public/static/plugins/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="/public/static/plugins/ueditor/ueditor.all.js"></script>
<script type="text/javascript">
    var ue = UE.getEditor('container');
</script>
<script id="container" name="content" type="text/plain">这里写你的初始化内容</script>

<script>
   var formData = new FormData();
   $(function() {

        $("#saveAndSend").on("click",function(){
            $("input[name=send]").val("1");
            var data = $("#formState").serialize();
            send(data);
        });

        $("#save").on("click",function(){ 
            var data = $("#formState").serialize();
            send(data);
       })

        function send(data) {
            $.ajax({
                type: 'POST',
                url: "{:url('admin/fixshenhe/shenhe_save')}",    
                data:data,
                dataType: "json",
                async: false,
                error: function(request) {
                    alert("发送请求失败！");
                },
                success: function(data){
                    if (data.status == 1) {
                        closeRefreshDialog();
                        //closeDialog();
                    } else {
                        $.messager.alert('提示', data.msg, 'error');
                    }
                       
                } 
            });
        }
    })

</script>

{include file="public/footer"/}